home *** CD-ROM | disk | FTP | other *** search
- P.B.A.R. (part B)
- -------- --------
-
-
-
- Now for the real trick......
-
- I. LOAD a program into the normal
-
- area (2049).
-
- II. Change the pointers using:
-
- >poke 43,x1:poke44,x2
-
- III. LOAD another program. This
-
- program will be loaded starting
-
- at the address: x1+x2*256.
-
- IV. Alternate between the two pro-
-
- grams by POKEing 43 & 44 to
-
- either (1 & 8) for the original
-
- program or to (x1 & x2) for
-
- the hidden program.
-
- V. Example:
-
- >LOAD "program 1",8
-
- >POKE 43,1:POKE 44,25
-
- >LOAD "program 2",8
-
- then
-
- for program 1: >POKE 43,1:POKE44,8
- for program 2: >POKE 43,1:POKE44,25
-
-
- Now you should be able to BURY AND
-
- RETRIEVE any programs.
-
-
-
- **And now for THREE words of warning**
-
-
- In normal operation if you:
-
- >print peek(2048)
-
- you should get:
-
- > 0
-
- When doing BURIAL AND RETRIEVAL, be
-
- POSITIVELY, ABSOLUTELY SURE that the
-
- location right before where you are
-
- going to start a load is set to ZERO.
-
- Do this by:
-
- >poke(x1+x2*256)-1,0
-
- The Commodore Operating System
-
- requires that the address right before
-
- a program to be set to zero.
-
-
- ****Warning #2****
-
- When you calculate your loading
-
- address for your second program, be
-
- sure that the value is between 2048
-
- and 40959. This is to insure that
-
- your program will go into a space
-
- which is used for BASIC programs. You
-
- also don't want to stick your program
-
- somewhere that will blow up your whole
-
- system and/or lock you out. So be
-
- careful when doing P.B.A.R.
-
- ****warning #3****
-
- You wind up with less variable space
-
- available when you use P.B.A.R.
-
-
- have fun and good luck!!!!
-
- - Alan
- .........
-
- Alan didn't mention this, but you
-
- don't have to "RUN" a second program
-
- to make this technique work. When you
-
- link back to the original program you
-
- loaded the variables from the second
-
- one are still intact. So, if you
-
- "GOTO" a line in the "buried" program
-
- instead of running it, you can use the
-
- buried program (or programs, if you're
-
- ambitious) as subroutines of the
-
- topmost.
-
-
- ALSO!!!! If you want to look at a
-
- directory without blowing your program
-
- away, POKE 44,128 (or some other
-
- suitably high address). Then load
-
- the directory (LOAD"$",8). When you
-
- are done looking at the directory,
-
- POKE 44,8. You can then resume your
-
- regularly scheduled programming.
-
- (Later, if you want to look at the
-
- directory again, chances are good that
-
- some of it will still be in memory
-
- waiting for a POKE 44,128 to reveal
-
- it again. Remember, all you have to
-
- do is LIST it and then set the
-
- pointers back to normal (1 & 8).
-
- - Jimmy Weiler
- --------------------------------------
-